Mac OS 8.5 Technote: Part XXI

Copyright 1998 by Apple Computer, Inc. All Rights Reserved.

[Previous section] [Mac OS 8.5 Contents Page] [Next section]

Inside the System File (Continued)

File Manager

The File Manager provides services for storaging and retrieving disk-based information. New features for the File Manager include:
  • PBXGetVolInfo was returning an incorrect value in ioVNmFls when ioVRefNum contained either a working directory id or volume number zero (the default directory) when the call referred to a FSM-based file system volume. As described in the File System Manager section, this has been corrected so the File Manager now passes the working directory id or zero through to FSM-based file systems, rather than converting the value to a real volume reference number first.

  • Under some circumstances, the hard disk on some PowerBook models would not spin down when it was instructed to do so by the Control Strip module. This has been corrected.

  • UnmountVol would sometimes return fBsyErr (File busy) errors when called for some server-mounted volumes because the File Manager was leaving some working directories open. This has been corrected.

  • The pleaseCacheBit (bit 4) in the ioPosMode field is now supported by the disk cache. Read/Write requests to HFS/HFS Plus volumes can now set the pleaseCacheBit in ioPosMode to request caching for larger blocks of data. File System Manager clients can also set this bit in the cacheOptions parameter to UTCacheReadIP, UTCacheWriteIP, UTVolCacheReadIP, and UTVolCacheWriteIP requests. Setting this bit does not guarantee a request will be cached; however, it does increase the probability of a request being cached.

  • PBGetFPos now clears all 16 bits of ioPosMode.

  • The routines PBAllocate and PBAllocContig have been modified so they set the value of ioActCount before they return even if an error occurs during their execution.

  • The minimum size for the disk cache is now 128K.

  • Previously, the colons occuring in file names were returned as-is, making such files unreachable using the Pascal string-based APIs. Colons are now converted to question marks (as are other non-representable characters) and the File ID is inserted in the name.

  • Calls to PBCatMove on HFS Plus-formatted volumes were creating oversized catalog file thread records, leaking space in the catalog file. This has been corrected.

  • A problem where PBGetCatSearchSync could return inconsistent results when searching HFS Plus volumes has been corrected.

  • When the HFS Plus code was saving the Volume Header information, it was sign-extending the attributes field, causing the upper bits to be set when the software lock bit (bit 15) was set. This sign extension no longer occurs.

  • PBCatSearch has been modified so it does not return catChangedErr as often as it did in previous system releases.

  • Placing a file ID in the directory ID field of a CInfoPBRec and calling PBGetCatInfo now correctly returns dirNFErr. Under Mac OS 8.1, this would incorrectly produce information about a file as if it were a directory. Before 8.1, it would return fnfErr.

  • Added a new call, PBHTrashVolumeCaches, that flushes a volume and invalidates that volume's caches in the File Manager and disk cache. Bit 2 of the vMAttrib field returned by GetVolParams is set if a volume supports this call.

  • HFS Plus volumes store all dates in UTC. In Mac OS 8.1, those dates were converted to/from local time using the current time zone and daylight savings time settings, which would cause the dates to appear to change by one hour when switching to/from daylight savings time. In Mac OS 8.5, the dates are converted using the daylight savings time setting that would have been in effect as of the date being converted.

  • In Mac OS 8.1, when a HFS or HFS Plus volume was extremely fragmented and an operation required the extents B-tree to grow beyond its maximum number of extents, the File Manager would return error -127 and leave extra bits set in the volume bitmap. (Disk First Aid would report this as a minor problem in the volume's allocation bitmap.) The File Manager has been corrected so that under these circumstances it will return a dskFulErr and it will not leave extra bits set in the volume bitmap.

  • A problem where a crash could occur when saving a log in MacsBug has been corrected. The File Manager was attempting to jump to location zero.

  • The File Manager was not properly invalidating some caches when a volume was unmounted. The most common symptoms were missing items in Finder windows when mounting/unmounting a series of floppies or disk images (such as installing software from floppies), or a disk switch dialog appearing asking for a disk with a garbage or blank name. The File Manager now correctly invalidates a volume's caches when it is unmounted.

  • A problem that could occur when mounting a CD-ROM has been corrected. In these cases, mounting a CD-ROM would sometimes lead to a dialog stating the volume needed to be repaired. Under certain conditions after a crash this could cause corruption of writable volumes when they were mounted.

  • A PBAllocContig call requesting more space than was available contiguously would return the correct error but still allocate a smaller amount of space. PBAllocContig has been changed so that under these conditions it no longer allocates any space.

  • The File Manager no longer writes to the first sector of a resource fork every time it is closed. Formerly, the first sector of a resource fork contained a copy of the 112-byte MFS directory entry intended for use by the Finder and disk repair utilities in older versions of Mac OS. No current disk repair utilities rely on this information, nor does the Finder. Removal of this extra read/write cycle speeds up Finder copies for files containing resource forks.

  • A problem that could occur when booting from a HFS volume has been corrected. If aliases to shared library files located on a Mac OS Extended volume were present in the Extensions folder, then these aliases would be modified in such a way that they would fail to resolve every time the system was rebooted. In Mac OS 8.5, such aliases resolve correctly.

  • A problem where PBDelete could return -127 and corrupt the volume bitmap when trying to delete a file on a HFS Plus volume has been corrected. This problem would occur when a filename was originally converted to Unicode using the wrong text encoding (e.g., an application creating a file using a Japanese filename without the language kit installed, but later attempting to delete the file with the language kit installed).

  • Fixed a problem where foreign (external) file systems could sometimes be called with asynchronous requests while interrupts were partially disabled. While this rarely occured, when it did, it caused problems for some foreign file systems (such as AppleShare) that use Open Transport to communicate with file servers. All asynchronous requests to foreign file systems now start at deferred task time or at system task time, with interrupts fully enabled.

WARNING:
Copying files near the 2 GB HFS file size limit to an HFS volume will fail when the destination file's physical size goes beyond the 2 GB size limit due to larger allocation block sizes being used on the destination volume.

Related Materials:

[Previous section] [Mac OS 8.5 Contents Page] [Next section]

To contact us, please use the Contact Us page.